package com.sxwphone;

import android.content.Intent;

import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;

public class MainActivity extends ReactActivity implements StartNewActivity{

    /**
     * Returns the name of the main component registered from JavaScript.
     * This is used to schedule rendering of the component.
     */
    @Override
    public String getMainComponentName() {
        return "sxwphone";
    }

    @Override
    protected ReactActivityDelegate createReactActivityDelegate() {
        return new MyReactActivityDelegate(this, getMainComponentName());
    }

    @Override
    public void startNewActivity(String name) {
        Intent intent = new Intent(this, NewActivity.class);
        intent.putExtra(NewActivity.NAME, name);
        startActivity(intent);
    }
}
